package com.baofang.bao.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baofang.bao.entity.SiteBulletin;
import com.baofang.bao.repository.SiteBulletinRepository;
@Service
public class SiteBulletinServiceImpl {
	@Autowired
	private SiteBulletinRepository sitebulletinrepository;
	public List<SiteBulletin> getUsers(){
		return sitebulletinrepository.findAll();
	}
	
	public SiteBulletin getUserById(Long id) {
		return sitebulletinrepository.getOne(id);
	}
	
	public SiteBulletin saveUser(SiteBulletin siteBulletin) {
		return sitebulletinrepository.saveAndFlush(siteBulletin);
	}
}
